import fetch from 'common/src/utils/fetch';

/**
 * 修改辅修微专业配置表
 */
export function updateMinorConfigInfo(data) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/updateMinorConfigInfo',
        method: 'PUT',
        data
    });
}

/**
 * 查询辅修微专业配置表
 */
export function queryMinorConfigInfo() {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/queryMinorConfigInfo',
        method: 'POST'
    });
}

/**
 * 查询进阶层次
 */
export function queryAdvancedLevelDic(data) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/queryAdvancedLevelDic',
        method: 'POST',
        data
    });
}

/**
 * 根据是否校内外查询进阶层次
 */
export function queryAdvancedLevelDicById(id) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/queryAdvancedLevelDicById' +
            id,
        method: 'GET'
    });
}

/**
 * 学校管理员根据辅修学校，进阶层次，专业是否启用查询辅修专业信息
 */
export function queryMinorProfessionInfo(data) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/queryMinorProfessionInfo',
        method: 'POST',
        data
    });
}

/**
 * 查询辅修学校信息queryUniversityDic
 */
export function queryUniversityDic() {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/queryUniversityDic',
        method: 'POST'
    });
}

/**
 * 根据学校CODE查询辅修学校信息queryUniversityDicByCode
 */
export function queryUniversityDicByCode(code) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/selectMinorProfessionInfo' +
            code,
        method: 'GET'
    });
}

/**
 * 辅修微专业删除
 */
export function deleteMinorProfessionInfo(data) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/deleteMinorProfessionInfo',
        method: 'DELETE',
        data
    });
}
/**
 * 辅修微专业编辑
 */
export function editMinorProfessionInfo(data) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/editMinorProfessionInfo',
        method: 'POST',
        data
    });
}
/**
 * 查询学院、专业
 *
 */
export function querySchemeFaultyProfession(data) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/querySchemeFaultyProfession',
        method: 'POST',
        data
    });
}
/**
 * 辅修微专业新增
 * @param {*} data
 */
export function addMinorProfessionInfo(data) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/addMinorProfessionInfo',
        method: 'POST',
        data
    });
}
/**
 * 查询辅修列表（我的报名页面）
 *
 */
export function queryMinorProfessionForStudent(data) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/queryMinorProfessionForStudent',
        method: 'POST',
        data
    });
}

/**
 * 提交报名申请
 *
 */
export function addApplyInfo(data) {
    return fetch({
        url: '/api/cultureservice/minorProfessionRegistration/addApplyInfo',
        method: 'POST',
        data
    });
}
/**
 * 查询报名成功/与否
 *
 */
export function queryIsApplyByStudentNo(data) {
    return fetch({
        url:
            '/api/cultureservice/minorProfessionRegistration/queryIsApplyByStudentNo',
        method: 'POST'
    });
}
/**
 * 查询是否有权限访问
 *
 */
export function queryIsPower() {
    return fetch({
        url: '/api/cultureservice/applyMinorSignUpList/queryUserInfo',
        method: 'POST'
    });
}

/**
 * 取消报名
 */
export function cancelApply(data) {
    return fetch({
        url: '/api/cultureservice/minorProfessionRegistration/cancelApply',
        method: 'POST',
        data
    });
}

//判断是否报名
export function checkIsApply() {
    return fetch({
        url: '/api/cultureservice/minorProfessionRegistration/queryApplyRecord',
        method: 'POST'
    });
}


//判断是否报名
export function queryIsSign(data) {
    return fetch({
        url: '/api/cultureservice/applyMinorSignUpList/queryIsSign',
        method: 'POST',
        data
    });
}

//初始化专业
export function initCampusProfession(data) {
    return fetch({
        url: '/api/cultureservice/minorProfessionRegistration/initCampusProfession',
        method: 'POST',
        data
    });
}